//
// Created by liushuai on 12/8/19.
//
#include "bublesort.h"
<<<<<<< HEAD:cxx/algorithm/src/bublesort.cc
std::vector<int> bublesort(std::vector<int> sortVec){
    int length = sortVec.size();
    for(int begin = 0;begin<length-1;begin++){
        for(int second = begin+1;second<length;second++){
            if(sortVec.at(begin)>sortVec.at(second))
                std::swap(sortVec.at(begin),sortVec.at(second));
=======
std::vector<int> bublesort(std::vector<int> &sortVec) {
    int length = sortVec.size();
    for (int begin = 0; begin < length - 1; begin++) {
        for (int second = begin + 1; second < length; second++) {
            if (sortVec.at(begin) > sortVec.at(second))
                std::swap(sortVec.at(begin), sortVec.at(second));
>>>>>>> dev:cxx/algorithm/common/src/bublesort.cc
        }
    }
    return sortVec;
}
